#ifndef IO_AUDIO_AUDIOFILES_H
#define IO_AUDIO_AUDIOFILES_H

#include <vector>
#include <string>
#include "Core/Commons.h"

#ifndef SAFE_DEL
#define SAFE_DEL SafeDelete
#endif

#ifndef SAFE_DEL_ARRAY
#define SAFE_DEL_ARRAY SafeDeleteArray
#endif

#if defined(TARGET_IPHONE_SIMULATOR) || defined(TARGET_OS_IPHONE)
#define OS_IPHONE
#endif

namespace gameloft
{
	namespace audio
	{
		typedef unsigned char u8;
		typedef unsigned short u16;
		typedef unsigned long u32;

		typedef unsigned long long int u64;

		typedef signed char s8;
		typedef signed short int s16;
		typedef signed long s32;

		typedef u64 OSTick;

		enum MusicFile
		{
			//MENU=0,	
			NUM_MUSIC,
		};

		//const int RADIO_INDEX = RADIO_ELECTRO_01;
		//const int NUM_RADIO_STATIONS = 6;

		enum SoundType
		{
			SFX=0,
			MUSIC,
		};

		enum SfxFile
		{
			STEP_FLOOR_1,
			STEP_FLOOR_2,
			STEP_FLOOR_3,
			SFX_SHOTGUN_PUMP,
			SFX_SHOTGUN_RELOAD,
			SFX_SHOTGUN_SHOOT1,
			SFX_SHOTGUN_SHOOT2,
			SFX_SHOTGUN_SHOOT3,
			SFX_BULLET_WIZ1,
			NUM_SFX,
		};
	}
}

class AudioFilenames
{
private:
	std::vector<std::string> m_musicFiles;
	std::vector<std::string> m_sfxFiles;

	AudioFilenames() :
	m_musicFiles(std::vector<std::string>()),
	m_sfxFiles(std::vector<std::string>())
	{
		//m_musicFiles.push_back("menu_underworld.mpc");

		m_sfxFiles.push_back("sfx_stepfloor_1.mpc");
		m_sfxFiles.push_back("sfx_stepfloor_2.mpc");
		m_sfxFiles.push_back("sfx_stepfloor_3.mpc");
		m_sfxFiles.push_back("sfx_shotgun_pump.mpc");
		m_sfxFiles.push_back("sfx_shotgun_reload.mpc");
		m_sfxFiles.push_back("sfx_shotgun_shoot_1.mpc");
		m_sfxFiles.push_back("sfx_shotgun_shoot_2.mpc");
		m_sfxFiles.push_back("sfx_shotgun_shoot_3.mpc");
		m_sfxFiles.push_back("sfx_bullet_whiz_1.mpc");
	}

public:
	inline static AudioFilenames& getInstance();

	inline std::string getSfxFilename(int sfxId)
	{
		if((unsigned)sfxId >= m_sfxFiles.size())
			return "";

		return m_sfxFiles[sfxId];
	}

	inline std::string getMusicFilename(int musicId)
	{
		if((unsigned)musicId >= m_musicFiles.size())
			return "";

		return m_musicFiles[musicId];
	}
};

AudioFilenames&
AudioFilenames::getInstance()
{
	static AudioFilenames afn;
	return afn;
}

#endif

